/**
 * 文章相关API
 */

import {
	http,
	Method
} from '@/utils/request.js';
import api from '@/config/api.js';

/**
 * 获取某个分类的文章列表
 * @param category_type
 */
export function getArticleCategory(category_type) {
	return http.request({
		url: `${api.base}/pages/article-categories`,
		method: Method.GET,
		params: {
			category_type
		},
	});
}

/**
 * 获取文章详情
 * @param type
 */
export function getArticleDetail(type) {
	return http.request({
		url: `/article/get/${type}`,
		method: Method.GET,
	});
}
/**
 * 获取文章详情
 * @param type
 */
export function getArticleDetailType(type) {
	return http.request({
		url: `/article/type/${type}`,
		method: Method.GET,
	});
}
/**
 * 
 *获取图片
 */
export function getPictureList(params) {
	return http.request({
		url: `/sysDictPicture/listByCode`,
		method: Method.GET,
		params
	});
}
/**
 * 获取帮助列表
 */
export function getPlatformAbout(params) {
	return http.request({
		url: `/platformAbout/getPlatformAbout`,
		method: Method.POST,
		data: params
	});
}
/**
 * 获取帮助详情
 */
export function getHelpDetail(params) {
	return http.request({
		url: `/platformAbout/getDetail`,
		method: Method.GET,
		params
	});
}
